<%-- 
    Document   : viewQuestions
    Created on : 01/09/2011, 11:28:52 AM
    Author     : s4200768
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ include file="../header.jsp" %>
<link rel="stylesheet" type="text/css" href="../style.css"/>
<div id="content-container">
    <div id="content">
        <!-- Content goes here -->
        <style type="text/css">

            .vQtable {
                font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
                width:80%;
                border:1px solid #009933;
                text-align:center;
            }
            .vQtable td, .vQtable th .vQtable tr {
                font-size:1em;    
                border:1px solid #009933;
                padding:3px 7px 2px 17px;
            }
            .vQtable th {
                font-size:1.1em;
                text-align:center;
                padding-top:5px;
                padding-bottom:4px;
                background-color:#008833;
                color:#ffffff;
            }
            
            #tab{
                margin-right:-180px;
                position:relative;
                left:8px;
            }
            #addlinks{
                padding-top:10px;
                padding-left: 0px;
            }
            #addlinks li {
                list-style-type: none;
            }
            #addlinks li a {
                text-decoration: none;
            }
            #button{
               float:right;
               padding-right:90px;
               padding-bottom: 10px;
          
            }


        </style>

        <div id="data">
            <form:form method="post" commandName="viewQuestions" name="Question" id="Question">
                <h3>List Of Questions</h3>

                <div id="tab">
                    <table class="vQtable">
                        <tr><th>Question ID</th><th>Question Text</th><th>Type</th><th>Status</th><th>View Answers</th><th>Test Question</th><th>Delete</th></tr>
                        <c:forEach items="${questions}" var="q">     
                            <tr>
                                <td>${q.getId()}</td>
                                <td>${q.getText()}</td>
                                <td>${q.getType()}</td>
                                <td>${q.getStatus()}</td>
                                <td><a href="viewAnswers.html?qid=<c:out value="${q.getId()}"/>&type=<c:out value="${q.getType()}"/>">View</a></td>
                                <td><a href="testQuestion.html?qid=<c:out value="${q.getId()}"/>">Test</a></td>
                                <td><a href="deleteQuestion.html?qid=<c:out value="${q.getId()}"/>">X</a></td>
                            </tr>
                        </c:forEach>

                        <c:out value="${fail}"/>

                    </table>
                </div>
                    <ul>
                        <li><td><a href="newMCQ.html?pid=<c:out value="${ppid}" />">New MC Question</a></td></li>
                        <li><td><a href="newSRQ.html?pid=<c:out value="${ppid}" />">New SR Question</a></td></li>
                    </ul>
                </form:form>
                <p> <input type="button" value="Back" onClick="javascript: history.go(-1)"></p>

            </div>
            <div id="data2">

            </div>
        </div>
    </div>		

    <%@ include file="../footer.jsp" %>

